package com.jcgyl.export.dao;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.jcgyl.export.entity.Customer;


public interface CustomerDao {
	/**查询所有客户*/
	List<Customer> findAllCustomer(
			@Param("name")String name,
			@Param("code")String code,
			@Param("contact")String contacts,
			@Param("phone")String tel,
	        @Param("email")String email,
	        @Param("startIndex")int startIndex,
	        @Param("pageSize")int pageSize
	        );
	/**查询客户数量*/
	int findRowCount(
			@Param("name")String name,
			@Param("code")String code,
			@Param("contact")String contacts,
			@Param("phone")String tel,
	        @Param("email")String email);
	
	/**根据客户姓名查询客户*/
	Customer findByNameOrCode(@Param("name")String name,@Param("code")String code);
	
	/**根据添加时间来查询客户*/
	List<Customer> findByAddDate(@Param("addTime")Date date);
	
	/**禁用启用客户*/
	int changeState(@Param("customerId")int customerId,@Param("isDelete")int isDelete);
	
	/**根据名字查询客户状态*/
	Customer findByName(@Param("name")String name);	
	/**根据Id查询客户状态*/
	Customer findById(@Param("id")int id);	
}
